package com.castle.fortress.admin.study.course.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.castle.fortress.admin.study.course.entity.StudyCourseLogEntity;
import com.castle.fortress.admin.study.course.dto.StudyCourseLogDto;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import java.util.Map;
import java.util.List;

/**
 * 课程记录表 服务类
 *
 * @author castle
 * @since 2023-02-14
 */
public interface StudyCourseLogService extends IService<StudyCourseLogEntity> {

    /**
     * 分页展示课程记录表列表
     * @param page
     * @param studyCourseLogDto
     * @return
     */
    IPage<StudyCourseLogDto> pageStudyCourseLog(Page<StudyCourseLogDto> page, StudyCourseLogDto studyCourseLogDto);


    /**
     * 展示课程记录表列表
     * @param studyCourseLogDto
     * @return
     */
    List<StudyCourseLogDto> listStudyCourseLog(StudyCourseLogDto studyCourseLogDto);

    /**
     * 更新课程的时长和状态
     * @param studyCourseLogEntity
     * @return
     */
    boolean updateStudyCourseLog(StudyCourseLogEntity studyCourseLogEntity);

    /**
     * 删除课程的全部学习记录
     */
    void removeByCourseId(Long courseId);
}
